package main;

import processing.core.PApplet;
import processing.core.PImage;

public class Transparency extends PApplet {

    PImage pImage;
    float offset = 0;
    float easing = 0.05f;

    @Override
    public void settings() {
        size(640, 360);
    }

    @Override
    public void setup() {
        pImage = loadImage("C:\\Users\\Hyper\\Pictures\\land.jpg");
    }

    @Override
    public void draw() {
        image(pImage, 0, 0);
        // the move speed level offsets.
        float dx = (mouseX-pImage.width/3f) - offset;
        offset += dx *easing;
        tint(255, 127);
        image(pImage,offset, 0);

    }
}
